<template>
  <ant-modal
    modalWidth="1000"
    modalHeight="600"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    :maskClosable="false"
    @cancel="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <biz-product
        v-if="showProductModal"
        ref="bizProduct"
        @ok="selectProduct"
        @close="showProductModal = false"
      />
      <a-row :gutter="32">
        <a-col :span="12" >
          <a-col>
            <a-form-model-item label="安装师傅" prop="userId">
            <select-user
              v-model="form.userId"
              select-model="multi"
            />
          </a-form-model-item>
          </a-col>
          <a-col>
            <a-form-model-item label="安装时间" prop="installDate">
              <a-date-picker
                v-model="form.installDate"
                valueFormat="YYYY-MM-DD"
                :show-today="true"
                placeholder="选择日期"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
          <a-col>
            <a-form-model-item label="安装备注" prop="userId">
            <select-user
              v-model="form.installRemark"
              select-model="multi"
            />
          </a-form-model-item>
          </a-col>
        </a-col>
        <a-col :span="12">
          <a-col>
            <a-form-model-item label="配送师傅" prop="userId">
            <select-user
              v-model="form.deliveryUserId"
              select-model="multi"
            />
          </a-form-model-item>
          </a-col>
          <a-col>
            <a-form-model-item label="配送时间" prop="installDate">
              <a-date-picker
                v-model="form.deliveryDate"
                valueFormat="YYYY-MM-DD"
                :show-today="true"
                placeholder="选择日期"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
          <a-col>
            <a-form-model-item label="配送备注" prop="userId">
            <select-user
              v-model="form.deliveryRemark"
              select-model="multi"
            />
          </a-form-model-item>
          </a-col>
          
        </a-col>
      </a-row>

    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel">
        取消
      </a-button>
      <a-button type="primary" @click="submitInstall(true)">
        保存
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import BizOrderForm from './BizOrderForm'
export default {
  ...BizOrderForm
}
</script>
<style lang="less" scoped>
.table-operations, body tr.ant-table-expanded-row:hover .table-operations {
  padding-bottom: 8px;
  text-align: right;
}
.table-operations {
  margin-bottom: 16px;
}
.table-operations > button,
.table-operations .ant-input-affix-wrapper{
  margin-right: 8px;
}
.table_title {
  float: left;
  padding-left: 8px;
  font-weight: 600;
  color: #222222;
  line-height: 30px;
}
</style>
